<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="/page" prefix="public"%>
<public:pageControl classPath="app.portalbs.system.appmanager.menu.MenuAuth" />
<title>授权菜单资源</title>
<script>

	function MenuAuthQueryBtn_onclick(form,page){
		form.instData();	    
	    form.parent.refresh();
	}
	
	function MenuAuthResetBtn_onclick(form,page){
		form.reset();
		form.parent.refresh();
	}

	function menuAuthBtn_onclick(grid,page) {
		grid.getCheckDataSet();
		if(grid.getRecordCount()<1) {
			alert("至少要选中一个菜单资源信息！");
			return;
		}
		var str="";
		while(grid.next()) {
			str+="#"+grid.getFieldValue("app_id")+","+grid.getFieldValue("menu_id")
		}
		if(str=="") {
			alert("未获取到菜单资源信息！");
			return;
		}
		str=str.substring(1);
		
		var sendset = new Yacon.data.DataSet(page); 
		sendset.setWhereField("str",str); 
		sendset.switchMessage("auth");
		
		page.windows.closeWindow();
	}
</script>
